package com.telkomsigma.spring.hibernate.persistence.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "contact")
public class Contact implements Serializable {

	/**
	 * @author viper serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	private String firstName;
	private String lastName;
	private String email;

	/**
	 * @author viper
	 * @return the firstName
	 */
	@Column(name = "firstname", nullable = false, length = 30)
	public String getFirstName() {
		return firstName;
	}

	/**
	 * @author viper
	 * @param firstName
	 *            the firstName to set
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * @author viper
	 * @return the lastName
	 */
	@Column(name = "lastname", nullable = false, length = 30)
	public String getLastName() {
		return lastName;
	}

	/**
	 * @author viper
	 * @param lastName
	 *            the lastName to set
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * @author viper
	 * @return the email
	 */
	@Column(name = "email", nullable = false, length = 30)
	public String getEmail() {
		return email;
	}

	/**
	 * @author viper
	 * @param email
	 *            the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @author viper
	 * @return the id
	 */
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return id;
	}

	/**
	 * @author viper
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

}
